﻿using LD.BC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LD.项目
{
    public class FobAoiHelper
    {
        public void Light(bool on_off)
        {
            var light = BcFactory.Instance.Config.IoList
                .Where(p => p.IoType == (int)IoType.输出 && p.Name.Contains("光源"))
                .FirstOrDefault();
            if (light != null)
            {
                if (on_off)
                    BcFactory.Instance.Control.SetOut((ushort)light.No, (int)LevelType.低电平);
                else
                    BcFactory.Instance.Control.SetOut((ushort)light.No, (int)LevelType.高电平);
            }
        }
    }
}
